package SingLeton;

public class Singlet {
    private static volatile Singlet  singlet = null;

    private Singlet(){}

    public static Singlet getInstance(){
        if (singlet==null){
            synchronized (Singlet.class){
                if (singlet==null){
                    singlet = new Singlet();
                }
            }
        }
        return singlet;
    }

}
